LD			= gcc
CC			= gcc

SRCS			= insidous.c projv2.c

LDFLAGS  		=
CFLAGS 			=  -Wall -ggdb   #-Wimplicit-function-declaration
#-pedantic    #-O2   # pour optimiser
LIBS			= `pkg-config --cflags --libs gtk+-2.0 --cflags glib-2.0`
OBJ_DIR 		= bin
SRC_DIR 		= src
BIN_DIR 		= bin
FINAL_TARGET		= INSIDOUS

default: $(BIN_DIR)/$(FINAL_TARGET)

$(BIN_DIR)/$(FINAL_TARGET): $(SRCS:%.c=$(OBJ_DIR)/%.o)
	$(LD) $+ -o $@ $(LDFLAGS) $(LIBS)

$(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
	$(CC) -c $(CFLAGS)  $< -o $@ $(LIBS)

clean:
	rm -f $(OBJ_DIR)/*.o $(BIN_DIR)/$(FINAL_TARGET)
